package com.example.print;

import android.app.Application;
import android.util.Log;

import com.example.print.other.ScreenReceiver;

/**
 * Created by wskyo on 2022/8/10.
 */

@Deprecated
public class App extends Application {

    private final static String TAG = "Serial.Init";
    //private static Context sContext;
    //private static App mApp;

    //private SerialPort mSerialPort = null;
    //public String path;
    //public int baudrate;

    //public static boolean mInit = false;
    //public static boolean mConnect = false;
    private ScreenReceiver sOnBroadcastReciver;

    @Override
    public void onCreate() {
        super.onCreate();

        Log.d(TAG, "-App.onCreate...");

//        sOnBroadcastReciver = new ScreenReceiver();
//        IntentFilter recevierFilter = new IntentFilter();
//        //recevierFilter.addAction(Intent.ACTION_SCREEN_ON);
//        recevierFilter.addAction(Intent.ACTION_SCREEN_OFF);
//        recevierFilter.addAction(Intent.ACTION_USER_PRESENT);
//        registerReceiver(sOnBroadcastReciver, recevierFilter);

    }

//    @Override
//    public void onTerminate() {
//        // 程序终止的时候执行
//        super.onTerminate();
//        Log.d(TAG, "onTerminate");
//    }
//    @Override
//    public void onLowMemory() {
//        // 低内存的时候执行
//        super.onLowMemory();
//        Log.d(TAG, "onLowMemory");
//    }
//    @Override
//    public void onTrimMemory(int level) {
//        // 程序在内存清理的时候执行
//        super.onTrimMemory(level);
//        Log.d(TAG, "onTrimMemory");
//    }
}
